package com.java.module.user.domain;

import java.util.ArrayList;
import java.util.List;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import com.java.common.lang.annotation.Excel;
import com.java.common.lang.annotation.FileData;
import com.java.common.lang.domain.BaseEntity;

import io.swagger.annotations.ApiModel;

/**
 * 意见反馈对象 user_feedback
 * 
 * @author Administrator
 * @date 2021-04-25
 */
@ApiModel(value = "意见反馈")
@FileData
public class Feedback extends BaseEntity {

    private static final long serialVersionUID = 1L;

    /** ID */
    private Long id;

    /** 删除标志（0默认 1删除） */
    private Integer delFlag;

    /** 平台标志：1安卓 2苹果 3电脑 */
    private Integer platform;

    /** 用户ID */
    private Long uid;

    /** 类型 */
    private Integer type;

    /** 内容 */
    @Excel(name = "内容")
    @NotBlank
    @Size(min = 10, max = 255)
    private String content;

    /** 图片 */
    @Excel(name = "图片")
    @FileData
    private List<Image> pics;

    /** 姓名 */
    @Excel(name = "姓名")
    private String realname;

    /** 联系方式 */
    @Excel(name = "联系方式")
    private String contactWay;

    /** 处理状态：0待处理 1已处理 */
    @Excel(name = "处理状态：0待处理 1已处理")
    private Integer checkStatus;

    public void setId(Long id) {
        this.id = id;
    }

    public Long getId() {
        return id;
    }

    public void setDelFlag(Integer delFlag) {
        this.delFlag = delFlag;
    }

    public Integer getDelFlag() {
        return delFlag;
    }

    public void setPlatform(Integer platform) {
        this.platform = platform;
    }

    public Integer getPlatform() {
        return platform;
    }

    public void setUid(Long uid) {
        this.uid = uid;
    }

    public Long getUid() {
        return uid;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public Integer getType() {
        return type;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getContent() {
        return content;
    }

    public void setPics(List<Image> pics) {
        this.pics = pics;
    }

    public List<Image> getPics() {
        if (pics == null) {
            return new ArrayList<Image>(0);
        }
        return pics;
    }

    public void setRealname(String realname) {
        this.realname = realname;
    }

    public String getRealname() {
        return realname;
    }

    public void setContactWay(String contactWay) {
        this.contactWay = contactWay;
    }

    public String getContactWay() {
        return contactWay;
    }

    public void setCheckStatus(Integer checkStatus) {
        this.checkStatus = checkStatus;
    }

    public Integer getCheckStatus() {
        return checkStatus;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).append("id", getId())
                .append("delFlag", getDelFlag()).append("createBy", getCreateBy()).append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy()).append("updateTime", getUpdateTime())
                .append("platform", getPlatform()).append("uid", getUid()).append("type", getType())
                .append("content", getContent()).append("pics", getPics()).append("realname", getRealname())
                .append("contactWay", getContactWay()).append("checkStatus", getCheckStatus()).toString();
    }

    @FileData
    public static class Image {

        @FileData
        private String url;

        public String getUrl() {
            return url;
        }

        public void setUrl(String url) {
            this.url = url;
        }

        @Override
        public String toString() {
            return "Image [url=" + url + "]";
        }

    }

}